package br.com.sysval.fornecedor.modelo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import br.com.sysval.endereco.modelo.Endereco;


@Entity
@Table(name="tbl_fornecedor")
public class Fornecedor {
	
	@Id
	@Column(name="cpfCnpj")
	private String cpfCnpj;
	
	@Column(name="nome")
	private String nome;
	
	@Column(name="rasaoSocial")
	private String rasaoSocial; 
	
	@ManyToOne(optional = true, fetch = FetchType.LAZY)
	@JoinColumn(name="endereco")
	private Endereco endereco;
	
	
}
